#ifndef _MAP_H_
#define _MAP_H_

#include "../tree/Tree.h"
#include "../../memory/Memory.h"

/*
	class : Map<Key, Value>
	desc : A class for map. Tries to mimic the 
	stl template library. The only difference is	
	it is a lot simplier. It won't have many perks
	to it. If you want to use another template library 
	just swap out the implementation of the map.
*/
template<typename Key, typename Value>
class Map
{		
	private:
		//creates a node for the map
		//to be used by the tree
		class MapNode
		{
			public:
			//key of node
			Key key;
			//value of node
			Value value;
			//node default constructor
			MapNode();
			// greater operation
			bool operator>(MapNode n);
			//equality operation
			bool operator==(MapNode n);
		};
		//The tree used to implement the map
		Tree<MapNode> map;
	public:	
		//default constructor
		Map();
		//adds a key to the map with a value
		void add(Key key, Value value);
		//sets a value in the map given a key
		void set(Key key, Value value);
		//gets a value in the map.
		Value get(Key key);
		//finds a key in the map
		bool find(Key key);
		//removes a key and value pair from the map.
		void remove(Key key);
		
};


#include "Map.cpp"


#endif
